package com.kjlink.widget.oa.model;

/**
 * 描述:
 *
 * @author Vic.xu
 * @since 2025-09-01 11:43
 */

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 用户信息实体类，与接口返回的用户列表JSON结构对应
 */
@JsonIgnoreProperties(ignoreUnknown = true)
public class OaUser {

    /**
     * 用户编码
     */
    @JsonProperty("userCode")
    private String userCode;

    /**
     * 用户名
     */
    @JsonProperty("userName")
    private String userName;
    /**
     * 邮箱地址
     */
    @JsonProperty("email")
    private String email;

    /**
     * 电话号码使用BigDecimal避免科学计数法问题
     * 接口返回值为1.5395012171E10（科学计数法），直接用long可能导致精度丢失
     */
    @JsonProperty("phoneNumber")
    private String phoneNumber; // 电话号码

    /**
     * 性别
     */
    @JsonProperty("sex")
    private String sex;

    /**
     * 部门名称
     */
    @JsonProperty("departmentName")
    private String departmentName;
    /**
     * 工作状态
     */
    @JsonProperty("workStatus")
    private String workStatus;

    /**
     * 更新日期格式化
     * pattern: 匹配JSON中的日期格式
     * timezone: 指定北京时间，避免时区转换问题
     */
    @JsonProperty("updateDate")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateDate;


    public String getUserCode() {
        return userCode;
    }

    public void setUserCode(String userCode) {
        this.userCode = userCode;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getPhoneNumber() {
        return phoneNumber;
    }

    public void setPhoneNumber(String phoneNumber) {
        this.phoneNumber = phoneNumber;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getDepartmentName() {
        return departmentName;
    }

    public void setDepartmentName(String departmentName) {
        this.departmentName = departmentName;
    }

    public String getWorkStatus() {
        return workStatus;
    }

    public void setWorkStatus(String workStatus) {
        this.workStatus = workStatus;
    }

    public Date getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }
}
